@extends('dashboard.createform')
@section('form')
	@section('title') 添加品牌 @endsection
	@section('form')
	<form action="{{isset($data) ? route('admin.brands.update', $data) : route('admin.brands.store')}}" method="post">
		@text(['name' => 'name', 'label' => '品牌名称', 'default' => $data->name??''])
		@endtext
		@upload(['name' => 'logo', 'label' => '品牌logo', 'default' => $data->logo??''])
		@endupload
		@radio([
			 
			'label' => '是否推荐', 
			'options' => [
				'name' => 'is_recommend',
				'default' => isset($data->is_recommend) ? $data->is_recommend : 0 ,
				'datas' => [
					[
						'option' => '是',
						'value' => 1,
					],

					[
						'option' => '否',
						'value' => '0',
					]
				]
			],
		])
		@endradio

		@textarea(['name' => 'description', 'label' => '描述', 'default' => $data->description??''])
		@endtextarea
		@isset($data) @method('PUT') @endisset
		@submit @endsubmit
	</form>
	@errmsg @enderrmsg
	@endsection
@endsection